package com.xbongbong.pro.applist.pojo;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.pojo.FormTitlePoJo;
import com.xbongbong.paas.pojo.SummaryDataPoJo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * @author long.rao
 * @version v1.0
 * @date 2019/3/6 21:51
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class AppListPojo implements Serializable {


    private static final long serialVersionUID = -5988820920258012554L;

    /**
     * 实体id
     */
    private Long id;

    /**
     * 名称或标题
     */
    private String name;

    /**
     * 字段解释
     */
    private JSONArray explains;

    /**
     * 上角标
     */
    private JSONObject superScript;

    /**
     * 底部标签
     */
    private JSONArray tags;

    /**
     * 其他（右上角，右下角等特殊位置）
     */
    private JSONObject others;

    /**
     * 子业务类型（日周月报）
     */
    private Integer subBusinessType;
    /**
     * 应用id
     */
    private Long appId;
    /**
     * 菜单id
     */
    private Long menuId;
    /**
     * 表单id
     */
    private Long formId;

    /**
     * 基础数据
     */
    private JSONObject basics;
    /**
     * 状态（目前是访客计划的状态）
     */
    private String status;

    private List<SummaryDataPoJo> summaryList;

    private List<SummaryDataPoJo> labelsList;

    private List<FormTitlePoJo> titleList;

    private List<List<SummaryDataPoJo>> stockFlowBillList;

    private String batch;

    private List<SummaryDataPoJo> guguaranteeInfo;

    private Integer businessType;

    private Long dataId;

    private List<SummaryDataPoJo> productPriceList;

    private Integer discount;

    /**
     * 智能补货列表页需要的特殊数据
     */
    private JSONObject data;


    public AppListPojo() {
        this.id = 0L;
        this.name = "";
    }

    public AppListPojo(Long id, String name, JSONArray explains, JSONObject superScript, JSONArray tags, JSONObject others) {
        this.id = id;
        this.name = name;
        this.explains = explains;
        this.superScript = superScript;
        this.tags = tags;
        this.others = others;
    }

    public AppListPojo(Long id, String name, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject superScript, List<SummaryDataPoJo> labelsList, JSONObject others) {
        this.id = id;
        this.name = name;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.superScript = superScript;
        this.labelsList = labelsList;
        this.others = others;
    }

    public AppListPojo(Long id, String name, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject superScript, List<SummaryDataPoJo> labelsList, JSONObject others, Long appId, Long menuId, Long formId) {
        this.id = id;
        this.name = name;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.superScript = superScript;
        this.labelsList = labelsList;
        this.others = others;
        this.appId = appId;
        this.menuId = menuId;
        this.formId = formId;
    }

    public AppListPojo(Long id, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject superScript, List<SummaryDataPoJo> labelsList, JSONObject others, JSONObject basics) {
        this.id = id;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.superScript = superScript;
        this.labelsList = labelsList;
        this.others = others;
        this.basics = basics;
    }

    public AppListPojo(Long id, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject superScript, List<SummaryDataPoJo> labelsList, JSONObject others) {
        this.id = id;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.superScript = superScript;
        this.labelsList = labelsList;
        this.others = others;
    }

    public AppListPojo(Long id, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject superScript, List<SummaryDataPoJo> labelsList, JSONObject others, List<List<SummaryDataPoJo>> stockFlowBillList) {
        this.id = id;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.superScript = superScript;
        this.labelsList = labelsList;
        this.others = others;
        this.stockFlowBillList = stockFlowBillList;
    }

    public AppListPojo(Long id, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject superScript, List<SummaryDataPoJo> labelsList, JSONObject others, List<List<SummaryDataPoJo>> stockFlowBillList, String batch) {
        this.id = id;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.superScript = superScript;
        this.labelsList = labelsList;
        this.others = others;
        this.stockFlowBillList = stockFlowBillList;
        this.batch = batch;
    }

    public AppListPojo(Long id, String name, JSONArray explains, JSONObject superScript, JSONArray tags, JSONObject others, Integer subBusinessType) {
        this.id = id;
        this.name = name;
        this.explains = explains;
        this.superScript = superScript;
        this.tags = tags;
        this.others = others;
        this.subBusinessType = subBusinessType;
    }

    public AppListPojo(Long id, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject superScript, List<SummaryDataPoJo> labelsList, JSONObject others, Integer subBusinessType) {
        this.id = id;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.superScript = superScript;
        this.labelsList = labelsList;
        this.others = others;
        this.subBusinessType = subBusinessType;
    }

    public AppListPojo(Long id, String name, JSONArray explains, JSONObject superScript, JSONArray tags, JSONObject others, Long appId, Long menuId, Long formId) {
        this.id = id;
        this.name = name;
        this.explains = explains;
        this.superScript = superScript;
        this.tags = tags;
        this.others = others;
        this.appId = appId;
        this.menuId = menuId;
        this.formId = formId;
    }

    public AppListPojo(Long id, String name, JSONArray explains, JSONObject superScript, JSONArray tags, JSONObject others, JSONObject basics) {
        this.id = id;
        this.name = name;
        this.explains = explains;
        this.superScript = superScript;
        this.tags = tags;
        this.others = others;
        this.basics = basics;
    }

    public AppListPojo(Long id, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject superScript, List<SummaryDataPoJo> labelsList, JSONObject others, Long appId, Long menuId, Long formId) {
        this.id = id;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.superScript = superScript;
        this.labelsList = labelsList;
        this.others = others;
        this.appId = appId;
        this.menuId = menuId;
        this.formId = formId;
    }

    public AppListPojo(Long id, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject superScript, List<SummaryDataPoJo> labelsList, JSONObject others, Long appId, Long menuId, Long formId, String name) {
        this.id = id;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.superScript = superScript;
        this.labelsList = labelsList;
        this.others = others;
        this.appId = appId;
        this.menuId = menuId;
        this.formId = formId;
        this.name = name;
    }

    public AppListPojo(Long id, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject superScript, List<SummaryDataPoJo> labelsList, String status, Long appId, Long menuId, Long formId) {
        this.id = id;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.superScript = superScript;
        this.labelsList = labelsList;
        this.status = status;
        this.appId = appId;
        this.menuId = menuId;
        this.formId = formId;
    }

    public AppListPojo(Long id, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject others, Long appId, Long menuId, Long formId) {
        this.id = id;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.others = others;
        this.appId = appId;
        this.menuId = menuId;
        this.formId = formId;
    }

    public AppListPojo(Long dataId, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject superScript, List<SummaryDataPoJo> lableList, JSONObject others, List<List<SummaryDataPoJo>> batctList, List<SummaryDataPoJo> guguaranteeObj) {
        this.id = dataId;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.superScript = superScript;
        this.labelsList = lableList;
        this.others = others;
        this.stockFlowBillList = batctList;
        this.guguaranteeInfo = guguaranteeObj;
    }

    public AppListPojo(Long id, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject superScript, List<SummaryDataPoJo> labelsList, JSONObject others, Long appId, Long menuId, Long formId, String name,Integer businessType,Long dataId) {
        this.id = id;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.superScript = superScript;
        this.labelsList = labelsList;
        this.others = others;
        this.appId = appId;
        this.menuId = menuId;
        this.formId = formId;
        this.name = name;
        this.businessType = businessType;
        this.dataId = dataId;
    }
    
    public AppListPojo(Long dataId, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, JSONObject others, List<SummaryDataPoJo> productPriceList) {
        this.id = dataId;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.others = others;
        this.productPriceList = productPriceList;
    }
    
    public AppListPojo(Integer discount, Long id, List<FormTitlePoJo> titleList, List<SummaryDataPoJo> summaryList, Object o, List<SummaryDataPoJo> lableList, JSONObject others) {
        this.discount = discount;
        this.id = id;
        this.titleList = titleList;
        this.summaryList = summaryList;
        this.labelsList = labelsList;
        this.others = others;
    }

    public AppListPojo(Long id, String name, JSONArray explains,  JSONObject others) {
        this.id = id;
        this.name = name;
        this.explains = explains;
        this.others = others;
    }
}
